FROM python:3-slim AS compile-image
COPY requirements.txt .
RUN pip install --user -r requirements.txt
FROM python:3-alpine AS build-image
COPY --from=compile-image /root/.local /root/.local
COPY settings.py .
COPY cleaner.py .
ENV PATH=/root/.local/bin:$PATH
ENTRYPOINT ["python","cleaner.py"]